package com.peanut.mapper;

import com.orm.annotation.Delete;
import com.orm.annotation.Select;
import com.orm.mapper.BaseMapper;
import com.peanut.entity.RoleMenu;

import java.util.List;

public interface RoleMenuMapper extends BaseMapper<RoleMenu> {
	
	
	// 根据角色 id 删除相关菜单
	@Delete("delete from role_menu where role_id = #{roleId}")
	void deleteByRoleId(int roleId);
	
	
	// 根据角色id 查记录
	@Select("select menu_id from role_menu where role_id = #{roleId}")
	List<Integer> queryByRoleId(int roleId);
}
